import { UserVo } from "../user/type";

export type Course = {
  id: string;
  name: string;
  code?: string;
  description: string;
  coverImage: string;
  teacher: UserVo;
  studentCount: number;
  createTime: string;
  term: string; // 学期
  teacherId?: string; // 教师ID
}

export interface CourseDetailData {
  name: string;
  code: string;
  term: number;
  description: string;
  requirements: string;
  coverImage: string;
  joinCode: string;
  maxStudent: number;
  teacherId: string;
}

export interface CourseDetailResponse {
  code: number;
  msg: string;
  data: CourseDetailData;
}

export interface CourseSubject {
  courseId: string;
  subjectId: string;
  type: 'EXAM' | 'HOMEWORK';
  status: 'ACTIVE' | 'INACTIVE';
  startTime: string;
  endTime: string;
}

export interface CourseSubjectResponse {
  code: number;
  msg: string;
  data: any;
}

export interface CourseListResponse {
  code: number;
  msg: string;
  data: Course[];
}